<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="include.jsp" %>
<html>
<head>
    <title>Yacht</title>
    <meta charset="utf8"/>
    <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="/static/css/main.css">
</head>
<body>
<div class="navbar">
    <div class="navbar-inner">
        <div class="navbar-inner-el-wrapper">
            <a class="brand" href="#">GlobalLogic Web Project</a>
            <ul class="nav">
                <li><a href="/home">Home</a></li>
                <li><a href="/new">New Yacht</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container">
    <dl class="dl-horizontal">
        <dt>Yacht Name</dt>
        <dd>${yacht.name}</dd>

        <dt>Owner</dt>
        <dd>
            <c:choose>
                <c:when test="${empty yacht.ownerName}">
                    <i>Unknown</i>
                </c:when>
                <c:otherwise>
                    ${yacht.ownerName}
                </c:otherwise>
            </c:choose>
        </dd>

        <dt>Type</dt>
        <dd>
            <span class="label label-success">${yacht.purpose}</span>
            <span class="label label-important">${yacht.drive}</span>
            <span class="label label-info">${yacht.hull}</span>
        </dd>

        <dt>Description:</dt>
        <dd>
            ${yacht.description}
        </dd>

        <br>

        <dt>Regattas:</dt>
        <dd>
            <c:forEach items="${regattas}" var="regatta" varStatus="status">
                <p class="text-info"><b>${regatta.name}</b>, ${regatta.city}, ${regatta.country} (${regatta.regattaDate})</p>
            </c:forEach>
            <br>
        </dd>

        <dt>Photo:</dt>
        <dd>
            <img src="/yacht/photo/${yacht.yachtId}" />
        </dd>
    </dl>
</div>
</body>
</html>